import argparse,os
parser = argparse.ArgumentParser()
parser.add_argument('-c', '--cuda', type=str, default='2', help='CUDA device id')
args, unknown = parser.parse_known_args()
os.environ['CUDA_VISIBLE_DEVICES'] = args.cuda


from utils.data import Preparator
import os
osj = os.path.join

if __name__ == '__main__':
    # Instantiate preparator
    prefix = '/mnt/nas/shengjie/qdrant_data'
    images_path = osj( prefix, 'images' )
    docs_path = osj( prefix, 'resources' )
    data_preparator = Preparator(
        imgs_path=images_path,
        docs_path = docs_path,
        collection_name='txt_img'
    )

    # Run data preparation pipeline
    data_preparator.run()
